package com.pwser.provider.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.pwser.common.entities.Dept;
import com.pwser.provider.mapper.DeptMapper;

@Service
public class DeptService {
	@Autowired
	private DeptMapper deptMapper;

	public boolean add(Dept dept) {
		return deptMapper.addDept(dept);
	}

	public Dept get(Long id) {
		return deptMapper.findById(id);
	}

	public List<Dept> list() {
		return deptMapper.findAll();
	}

}
